package com.hooview.api.service.impl;

import com.hooview.api.dao.ProfitRecordMapper;
import com.hooview.api.entity.ProfitRecord;
import com.hooview.api.service.ProfitRecordService;
import com.hooview.utils.SnowflakeIdWorker;
import org.springframework.beans.factory.annotation.Autowired;

public class ProfitRecordServiceImpl implements ProfitRecordService {

    @Autowired
    private ProfitRecordMapper profitRecordMapper;

    @Autowired
    private SnowflakeIdWorker snowflakeIdWorker;

    @Override
    public ProfitRecord queryByUser(String uid) {
        return null;
    }

    @Override
    public void save(ProfitRecord profitRecord) {
        String id= String.valueOf(snowflakeIdWorker.nextId());
        profitRecord.setId(id);
        profitRecordMapper.insert(profitRecord);
    }

    @Override
    public void update(ProfitRecord profitRecord) {

    }

    @Override
    public void delete(String id) {

    }
}
